import contextlib


@contextlib.contextmanager
def open_file(name):
    print("file open")
    yield
    print("file close")


with open_file("bobby.txt") as f_opened:
    print('file processing')



